package com.topsun.framework.common.kafka.pojo;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: 皮皮
 * @date: 2021/11/24 9:04 上午
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class Message<K, V> {

    private Long messageId;

    private K key;

    private V data;

    @Builder.Default
    @JSONField(serialize = false)
    Map<String, String> headers = new HashMap<>();

}
